/// 后台用户编辑参数
class BackendUserUpdateDto {
  /// 用户ID
  final int userId;
  /// 用户名
  final String userName;
  /// 角色ID
  final int roleId;
  /// 邮箱
  final String email;

  BackendUserUpdateDto({
    required this.userId,
    required this.userName,
    required this.roleId,
    required this.email,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['userId'] = userId;
    data['userName'] = userName;
    data['roleId'] = roleId;
    data['email'] = email;
    return data;
  }

  factory BackendUserUpdateDto.fromJson(Map<String, dynamic> json) {
    return BackendUserUpdateDto(
      userId: json['userId'],
      userName: json['userName'],
      roleId: json['roleId'],
      email: json['email'],
    );
  }
}